<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich">
  <head><title>Swiadectwa</title></head>
  <body>
  
<f:view >
	<a4j:form>
	<!-- <rich:panel style="width:50%;  margin-left: auto ;margin-right: auto"> 
					    <rich:comboBox selectFirstOnUpdate="true"
										listWidth="90" 
										value="#{comboDemoBean.backgroundColorItem}"										
					        			defaultLabel="Wybierz wydział" id="bgColorCombo">
					        <f:selectItems value="#{comboDemoBean.selectItems['Colors']}"  />
					    </rich:comboBox>
					</rich:panel> -->
		<rich:panel>
        <f:facet name="header"><h:outputText value="Login"/></f:facet>
        <center>
        <h:panelGrid columns="3" title="user" rowClasses="s1row" columnClasses="wfcol1,wfcol2,wfcol3">
        	<h:outputText value="Hasło" />
			<h:inputText value="#{rejestracja.haslo}" id="haslo" required="true"/>
			<rich:message for="haslo" />
			<h:outputText value="E-mail " />
			<h:inputText value="#{rejestracja.email}" id="email" required="true"/>
			<rich:message for="email" />
			<center>
				<h:commandButton id="loguj" action="#{rejestracja.loguj}" value="Loguj" />
			</center>
			<center>
			<h:commandButton  id="rejestruj_"  action="#{rejestracja.rejestruj}" value="Nie posiadam konta" />
		</center>
		</h:panelGrid>
		</center>
    	</rich:panel>
	</a4j:form>
</f:view>
    <a4j:jsFunction name="ajaxSubmit" oncomplete="#{rich:component('panel1')}.show()" 
reRender="panel1" />
    <rich:modalPanel id="panel1" width="350" height="100"
 showWhenRendered="#{rejestracja.mp.wynik}">
        <f:facet name="header">
            <h:panelGroup>
                <h:outputText value="#{rejestracja.mp.naglowek}"></h:outputText>
            </h:panelGroup>
        </f:facet>
        <f:facet name="controls">
            <h:panelGroup>
            	<h:commandButton   id="hidelink1" value="X"/>
                <rich:componentControl for="panel1" attachTo="hidelink1" operation="hide" event="onclick"/>
            </h:panelGroup>
        </f:facet>
        <h:outputText value="#{rejestracja.mp.tresc}"></h:outputText>
    </rich:modalPanel>
     </body>
</html>

